package com.shengqi.xinnongren.common.config.network;

import com.shengqi.xinnongren.work.model.HttpRespond;
import com.shengqi.xinnongren.work.ui.goods.model.CommentBean;
import com.shengqi.xinnongren.work.ui.goods.model.CommentDesc;
import com.shengqi.xinnongren.work.ui.goods.model.GoodsDetailBean;
import com.shengqi.xinnongren.work.ui.goods.model.PayResultBean;
import com.shengqi.xinnongren.work.ui.home.model.AddToCarBean;
import com.shengqi.xinnongren.work.ui.home.model.ClassBean;
import com.shengqi.xinnongren.work.ui.home.model.GoodsBean;
import com.shengqi.xinnongren.work.ui.home.model.HomePage1Bean;
import com.shengqi.xinnongren.work.ui.home.model.HotSearchBean;
import com.shengqi.xinnongren.work.ui.home.model.NewsBean;
import com.shengqi.xinnongren.work.ui.home.model.NewsDetailsBean;
import com.shengqi.xinnongren.work.ui.home.model.RecommendGoodsBean;
import com.shengqi.xinnongren.work.ui.home.model.SearchBean;
import com.shengqi.xinnongren.work.ui.home.model.SplashBean;
import com.shengqi.xinnongren.work.ui.home.model.StoreListBean;
import com.shengqi.xinnongren.work.ui.home.model.TakeGoodsBean;
import com.shengqi.xinnongren.work.ui.user.model.CaptchaBean;
import com.shengqi.xinnongren.work.ui.user.model.ProtocolBean;
import com.shengqi.xinnongren.work.ui.user.model.ServiceBean;
import com.shengqi.xinnongren.work.ui.user.model.StoreDetailBean;
import com.shengqi.xinnongren.work.ui.user.model.TimeStampBean;
import com.shengqi.xinnongren.work.ui.user.model.ToBeVipBean;
import com.shengqi.xinnongren.work.ui.user.model.UploadPicBean;
import com.shengqi.xinnongren.work.ui.user.model.VersionBean;
import com.shengqi.xinnongren.work.ui.user.model.WeChatLoginBean;

import java.util.List;

import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by xuyougen on 2018/4/11.
 */

public interface ApiService {


    @POST("/api/logIn/getPicCode")
    Observable<HttpRespond<CaptchaBean>> getCaptcha(
            @Body RequestBody requestBody);

    @POST("/api/logIn/checkPicCode")
    Observable<HttpRespond> getSmsCode(
            @Body RequestBody requestBody);

    @POST("/api/logIn/getTimestamps")
    Observable<HttpRespond<TimeStampBean>> getTimeStamps(
            @Body RequestBody requestBody);

    @POST("/api/logIn/register")
    Observable<HttpRespond> register(@Body RequestBody requestBody);


    @POST("/api/logIn")
    Observable<HttpRespond> login(@Body RequestBody requestBody);

    @POST("/api/logIn/weChatLogin")
    Observable<HttpRespond<String>> WeChatLogin(@Body RequestBody requestBody);

    @POST("/api/logIn/checkSmsCode")
    Observable<HttpRespond> checkCaptcha(@Body RequestBody requestBody);

    @POST("/api/logIn/retrievePassword")
    Observable<String> forgetPwd(@Body RequestBody requestBody);

    //    ?type=1&page=1
    @GET("satinApi")
    Observable<String> getContent(@Query("type") int type, @Query("page") int page);

    @POST("/api/main/MyPickupCommodity")
    Observable<HttpRespond<TakeGoodsBean>> getTakeGoodsInfo(@Body RequestBody requestBody);

    @POST("/api/userInfo")
    Observable<String> myCenterPage(@Body RequestBody requestBody);

    @POST("/api/indexPage/contentList")
    Observable<HttpRespond<List<NewsBean>>> getNewsList(@Body RequestBody requestBody);

    //微头条详情
    @POST("/api/main/showMicroDetail")
    Observable<HttpRespond<NewsDetailsBean>> getNewsDetails(@Body RequestBody requestBody);

    @POST("/api/main/toggleStore")
    Observable<HttpRespond<List<StoreListBean>>> getStoreList(@Body RequestBody requestBody);

    @POST("/api/bootRes/getFile")
    Observable<HttpRespond<SplashBean>> getSplashContent(@Body RequestBody requestBody);

    @POST("/api/comClass")
    Observable<String> getClassList(@Body RequestBody requestBody);

    @POST("/api/comDetail")
    Observable<HttpRespond<GoodsDetailBean>> getGoodsDetails(@Body RequestBody requestBody);

    @POST("/api/valuation/valuationHead")
    Observable<String> getCommentHeadInfo(@Body RequestBody requestBody);

    @POST("/api/comClass/comList")
    Observable<HttpRespond<List<GoodsBean>>> getGoodsListByClass(@Body RequestBody requestBody);

    @POST("/api/valuation/valuationList")
    Observable<HttpRespond<List<CommentBean>>> getGoodsCommentList(@Body RequestBody requestBody);

    @POST("/api/indexPage/indexPage")
    Observable<HttpRespond<HomePage1Bean>> getHomeData(@Body RequestBody requestBody);

    @POST("/api/indexPage/newComList")
    Observable<HttpRespond<List<RecommendGoodsBean>>> getRecommendGoodsList(@Body RequestBody requestBody);

    @POST("/api/indexPage/hotSearch")
    Observable<HttpRespond<List<HotSearchBean>>> getHotSearchList(@Body RequestBody requestBody);

    @POST("/api/indexPage/searchComList")
    Observable<String> getSearchList(@Body RequestBody requestBody);

    //获取用户协议
    @POST("/api/logIn/registerProtocolContent")
    Observable<HttpRespond<ProtocolBean>> getProtocal(@Body RequestBody requestBody);

    //获取门店详情
    @POST("/api/main/storeDetail")
    Observable<HttpRespond<StoreDetailBean>> getStoreDetail(@Body RequestBody requestBody);

    //检查版本
    @POST("/api/member/checkUpdate")
    Observable<HttpRespond<VersionBean>> checkVersion(@Body RequestBody requestBody);

    //获取购物车商品数量
    @POST("/api/shoppingCart/shoppingCartNum")
    Observable<String> getShoppingCartNum(@Body RequestBody requestBody);

    //保存门店
    @POST("/api/main/updateUserStore")
    Observable<HttpRespond> saveStore(@Body RequestBody requestBody);

    //获取商品规格
    @POST("/api/shoppingCart/getSkuList")
    Observable<String> getGoodsSpecList(@Body RequestBody requestBody);

    //添加商品到购物车
    @POST("/api/shoppingCart/addShoppingCart")
    Observable<String> changeSpecNum(@Body RequestBody requestBody);

    //获取购物车数据
    @POST("/api/shoppingCart/shoppingCartList")
    Observable<String> getCarData(@Body RequestBody requestBody);

    //购物车商品数量加减
    @POST("/api/shoppingCart/updateShoppingCart")
    Observable<HttpRespond<AddToCarBean>> addCarNum(@Body RequestBody requestBody);

    //余额
    @POST("/api/userInfo/myMoney")
    Observable<String> getBalance(@Body RequestBody requestBody);

    //余额明细
    @POST("/api/userInfo/logMoney")
    Observable<String> getBalanceDetail(@Body RequestBody requestBody);

    //修改密码
    @POST("/api/logIn/changePassword")
    Observable<HttpRespond<String>> updatePwd(@Body RequestBody requestBody);

    //关于我们
    @POST("/api/userInfo/aboutUs")
    Observable<HttpRespond<String>> getAboutUsData(@Body RequestBody requestBody);

    //版本介绍
    @POST("/api/userInfo/versionIntroduction")
    Observable<HttpRespond<String>> getVersionIntroduction(@Body RequestBody requestBody);

    //积分
    @POST("/api/userInfo/myIntegral")
    Observable<String> getIntegralData(@Body RequestBody requestBody);

    @POST("/api/userInfo/logIntegral")
    Observable<String> getIntegralList(@Body RequestBody requestBody);

    //删除购物车商品
    @POST("/api/shoppingCart/deleteShoppingCart")
    Observable<String> removeCartGoods(@Body RequestBody requestBody);

    //结算合计
    @POST("/api/shoppingCart/selectShoppingCart")
    Observable<String> calculateMoney(@Body RequestBody requestBody);

    //收藏列表
    @POST("/api/collect/myCollect")
    Observable<String> getCollectionList(@Body RequestBody requestBody);

    //删除收藏
    @POST("/api/collect/deleteCollect")
    Observable<HttpRespond> delCollection(@Body RequestBody requestBody);

    //添加收藏
    @POST("/api/collect/addCollect")
    Observable<String> collectionGoods(@Body RequestBody requestBody);

    //获取最新消息
    @POST("/api/userInfo/myMessage")
    Observable<String> getMessageData(@Body RequestBody requestBody);

    //获取消息列表
    @POST("/api/userInfo/readMessage")
    Observable<String> getMessageList(@Body RequestBody requestBody);

    //获取省市区
    @POST("/api/address/getProvinceCityCounty")
    Observable<String> getProvinceCityCounty(@Body RequestBody requestBody);

    //新增收货地址
    @POST("/api/address/insertAddressInfo")
    Observable<HttpRespond> saveAddress(@Body RequestBody requestBody);

    //获取地址
    @POST("/api/address")
    Observable<String> getAddressList(@Body RequestBody requestBody);

    //删除地址
    @POST("/api/address/deleteAddressInfo")
    Observable<HttpRespond<String>> delAddress(@Body RequestBody requestBody);

    //编辑地址
    @POST("/api/address/updateAddressInfo")
    Observable<HttpRespond> editAddress(@Body RequestBody requestBody);

    //上传图片
    @Multipart
    @POST("/api/upload/filesUpload")
    Observable<HttpRespond<List<UploadPicBean>>> uploadImage(@Part("token") RequestBody token, @Part("client") RequestBody client, @Part MultipartBody.Part image_part);

    //获取评论里的商品信息
    @POST("/api/valuation/orderComList")
    Observable<String> getCommitOrderInfo(@Body RequestBody requestBody);

    //添加评论
    @POST("/api/valuation/addValuation")
    Observable<HttpRespond> addComment(@Body RequestBody requestBody);

    //我的评论头信息
    @POST("/api/userInfo/myEvaluationListHead")
    Observable<HttpRespond<CommentDesc>> getMyCommentHeadInfo(@Body RequestBody requestBody);

    @POST("/api/valuation/myValuationList")
    Observable<String> getMyCommentList(@Body RequestBody requestBody);

    //获取订单页相关数据
    @POST("/api/submitOrder/getInfo")
    Observable<HttpRespond<String>> getOrderData(@Body RequestBody requestBody);

    //获取订单页相关数据
    @POST("/api/order/getSubmitOrderInfo")
    Observable<String> getPrepareOrderInfo(@Body RequestBody requestBody);

    //提交订单
    @POST("/api/order/submitOrder")
    Observable<String> commitOrder(@Body RequestBody requestBody);

    //创建订单
    @POST("/api/submitOrder/addOrder")
    Observable<HttpRespond<String>> createOrder(@Body RequestBody requestBody);

    //获取支付页面信息
    @POST("/api/order/paymentInterface")
    Observable<String> getPayData(@Body RequestBody requestBody);

    //发起支付
    @POST("/api/order/payOrder")
    Observable<String> pay(@Body RequestBody requestBody);

    //发起支付(支付宝)
    @POST("/api/submitOrder/alipayCreateOrder")
    Observable<HttpRespond<String>> payAli(@Body RequestBody requestBody);

    //发起支付(微信)
    @POST("/api/submitOrder/wechatCreateOrder")
    Observable<HttpRespond<String>> payWeChat(@Body RequestBody requestBody);

    //支付结果
    @POST("/api/submitOrder/successInfo")
    Observable<HttpRespond<PayResultBean>> getPayRes(@Body RequestBody requestBody);

    //获取我的订单
    @POST("/api/order/myOrderList")
    Observable<String> getOrderList(@Body RequestBody requestBody);

    //获取订单详情
    @POST("/api/userInfo/OrderInfo")
    Observable<HttpRespond<String>> getOrderDetails(@Body RequestBody requestBody);

    //获取订单详情2
    @POST("/api/order/orderInfo")
    Observable<String> getOrderDetails2(@Body RequestBody requestBody);

    //选择附件算钱
    @POST("/api/submitOrder/calculationAmount")
    Observable<HttpRespond<String>> calculateOrderMoney(@Body RequestBody requestBody);

    //取消订单
    @POST("/api/submitOrder/cancellationOrder")
    Observable<HttpRespond<String>> cancelOrder(@Body RequestBody requestBody);

    //取消订单
    @POST("/api/order/orderCancel")
    Observable<String> cancelOrder2(@Body RequestBody requestBody);

    //确认收货取货
    @POST("/api/order/confirmReceipt")
    Observable<HttpRespond<String>> confirmOrder(@Body RequestBody requestBody);

    //退货界面数据
    @POST("/api/order/returnOrderInfo")
    Observable<String> getRefoundData(@Body RequestBody requestBody);

    //支付成功后修改订单状态
    @POST("/api/submitOrder/paySuccess")
    Observable<String> paySuccess(@Body RequestBody requestBody);

    //退货算钱
    @POST("/api/order/returnOrderSumMoney")
    Observable<String> calculateRefundMoney(@Body RequestBody requestBody);

    //退款提交信息
    @POST("/api/order/insertReturnOrder")
    Observable<String> commitRefundInfo(@Body RequestBody requestBody);

    @POST("/api/indexPage/specialComList")
    Observable<String> getSpecialSaleGoodsList(@Body RequestBody requestBody);

    @POST("/api/userInfo/getCheckRecordList")
    Observable<String> getCheckRecordList(@Body RequestBody requestBody);

    //签到
    @POST("/api/userInfo/insertCheckRecord")
    Observable<String> insertCheckRecord(@Body RequestBody requestBody);

    //获取个人信息，用于修改
    @POST("/api/userInfo/userInfo")
    Observable<String> userInformation(@Body RequestBody requestBody);

    //修改个人信息
    @POST("/api/userInfo/updateUserInfo")
    Observable<HttpRespond> updateUserInformation(@Body RequestBody requestBody);

    //获取优惠券数量
    @POST("/api/coupon/couponSum")
    Observable<String> getCouponNum(@Body RequestBody requestBody);

    //获取优惠券
    @POST("/api/coupon/couponList")
    Observable<String> getCouponList(@Body RequestBody requestBody);

    //删除优惠券
    @POST("/api/coupon/deleteAlreadyUsedCoupon")
    Observable<HttpRespond<String>> deleteCoupon(@Body RequestBody requestBody);

    //客服
    @POST("/api/userInfo/customerService")
    Observable<HttpRespond<ServiceBean>> getServiceData(@Body RequestBody requestBody);

    //获取退货详情
    @POST("/api/order/getReturnOrderDetails")
    Observable<String> getRefundDetails(@Body RequestBody requestBody);

    //获取支付宝登录所需数据
    @POST("/api/logIn/aLiPayLoginInfo")
    Observable<HttpRespond<String>> getALiLoginData(@Body RequestBody requestBody);

    @POST("/api/logIn/aLiPayLogin")
    Observable<HttpRespond<String>> ALiLogin(@Body RequestBody requestBody);

    @POST("/api/userInfo/rechargeAmount")
    Observable<String> getReChargeData(@Body RequestBody requestBody);

    @POST("/api/userInfo/recharge")
    Observable<String> reChargePay(@Body RequestBody requestBody);

    @POST("/api/userInfo/openVipInfo")
    Observable<String> getToBeVipData(@Body RequestBody requestBody);

    @POST("/api/userInfo/openVip")
    Observable<String> vipPay(@Body RequestBody requestBody);
}


